{% extends "cashflow/base.html" %}

{% block content %}

<section id="category">
  <div class="page-header">
    <h1>Category</h1>
  </div>
  <a href="{% url category-add %}">New Category</a>
  
  <table class="data">
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Tax</th>
      <th>Description</th>  
      <th><i class="icon-wrench"></i></th>       
    </tr>
  {% for category in categorys %}
    <tr>
      <td><a href="{% url transaction-by-category category.id %}">{{ category.name }}</a></td>
      <td>{{ category.get_type_display }}</td>
      <td>{{ category.tax }}</td>
      <td>{{ category.description }}</td>    
      <td>
          <a href="/cashflow/category/edit/{{ category.id }}/"><i class="icon-pencil"></i></a> 
          <a href="/cashflow/category/delete/{{ category.id }}/"><i class="icon-trash"></i></a>
      </td>
    </tr>
  {% endfor %}
  </table>
</section>

{% endblock %}